<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'dispatchtech-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
        <?php echo $form->hiddenField($model,'empno',$model->getEmployeeList()); ?>
        <?php echo $form->hiddenField($model,'counter',array('value'=>$model->getNextCounter())); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'dispatch'); ?>
		<?php echo $form->textField($model,'dispatch',array('size'=>15,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'dispatch'); ?>
	</div>
        
        <div class="row">
		<?php echo $form->labelEx($model,'empno'); ?>
		<?php echo $form->dropDownList($model,'empno',Employees::model()->getEmployeeList()); ?>
		<?php echo $form->error($model,'empno'); ?>
	</div>
        
        <div class="row">
		<?php echo $form->labelEx($model,'promisedate'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'promisedate',
                    'value'=>CTimestamp::formatDate('m-d-Y',$model->promisedate),
                    'options' => array('promisedate'=>'m-d-yy'),
                )); ?>
		<?php echo $form->error($model,'promisedate'); ?>
	</div>
        
        <div class="row">
		<?php echo $form->labelEx($model,'promisetime'); ?>
		<?php $this->widget('CMaskedTextField',array(
                    'model'=>$model,
                    'attribute'=>'promisetime',
                    'mask'=>'99:99:99',
                    'htmlOptions'=>array(
                        'size'=>6
                    )
                ));?>
		<?php echo $form->error($model,'promisetime'); ?>
	</div>
        
        <div class="row">
		<?php echo $form->labelEx($model,'tpromisedate'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'tpromisedate',
                    'value'=>CTimestamp::formatDate('m-d-Y',$model->tpromisedate),
                    'options' => array('tpromisedate'=>'m-d-yy'),
                )); ?>
		<?php echo $form->error($model,'tpromisedate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'tpromisetime'); ?>
		<?php $this->widget('CMaskedTextField',array(
                    'model'=>$model,
                    'attribute'=>'tpromisetime',
                    'mask'=>'99:99:99',
                    'htmlOptions'=>array(
                        'size'=>6
                    )
                ));?>
		<?php echo $form->error($model,'tpromisetime'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<?php echo $form->textField($model,'status',array('size'=>25,'maxlength'=>25)); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'dispatchdate'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'dispatchdate',
                    'value'=>CTimestamp::formatDate('m-d-Y',$model->dispatchdate),
                    'options' => array('dispatchdate'=>'m-d-yy'),
                )); ?>
		<?php echo $form->error($model,'dispatchdate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'dispatchtime'); ?>
		<?php $this->widget('CMaskedTextField',array(
                    'model'=>$model,
                    'attribute'=>'dispatchtime',
                    'mask'=>'99:99:99',
                    'htmlOptions'=>array(
                        'size'=>6
                    )
                ));?>
		<?php echo $form->error($model,'dispatchtime'); ?>
	</div>
        
        <div class="row">
		<?php echo $form->labelEx($model,'dispatcher'); ?>
		<?php echo $form->textField($model,'dispatcher',array('size'=>25,'maxlength'=>25)); ?>
		<?php echo $form->error($model,'dispatcher'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'timeon'); ?>
		<?php $this->widget('CMaskedTextField',array(
                    'model'=>$model,
                    'attribute'=>'timeon',
                    'mask'=>'99:99:99',
                    'htmlOptions'=>array(
                        'size'=>6
                    )
                ));?>
		<?php echo $form->error($model,'timeon'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'timeoff'); ?>
		<?php $this->widget('CMaskedTextField',array(
                    'model'=>$model,
                    'attribute'=>'timeoff',
                    'mask'=>'99:99:99',
                    'htmlOptions'=>array(
                        'size'=>6
                    )
                ));?>
		<?php echo $form->error($model,'timeoff'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'dateoff'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
                    'model'=>$model,
                    'attribute'=>'dateoff',
                    'value'=>CTimestamp::formatDate('m-d-Y',$model->dateoff),
                    'options' => array('dateoff'=>'m-d-yy'),
                )); ?>
		<?php echo $form->error($model,'dateoff'); ?>
	</div>

	

	<div class="row">
		<?php echo $form->labelEx($model,'complete'); ?>
		<?php echo $form->checkBox($model,'complete'); ?>
		<?php echo $form->error($model,'complete'); ?>
	</div>

	

	

	

	<div class="row">
		<?php echo $form->labelEx($model,'priority'); ?>
		<?php echo $form->textField($model,'priority',array('size'=>6,'maxlength'=>6)); ?>
		<?php echo $form->error($model,'priority'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'techtime'); ?>
		<?php $this->widget('CMaskedTextField',array(
                    'model'=>$model,
                    'attribute'=>'techtime',
                    'mask'=>'99:99:99',
                    'htmlOptions'=>array(
                        'size'=>6
                    )
                ));?>
		<?php echo $form->error($model,'techtime'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'sorttime'); ?>
		<?php $this->widget('CMaskedTextField',array(
                    'model'=>$model,
                    'attribute'=>'sorttime',
                    'mask'=>'99:99:99',
                    'htmlOptions'=>array(
                        'size'=>6
                    )
                ));?>
		<?php echo $form->error($model,'sorttime'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'mobile'); ?>
		<?php echo $form->textField($model,'mobile'); ?>
		<?php echo $form->error($model,'mobile'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'poreceived'); ?>
		<?php echo $form->checkBox($model,'poreceived'); ?>
		<?php echo $form->error($model,'poreceived'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'timeentrycreated'); ?>
		<?php echo $form->checkBox($model,'timeentrycreated'); ?>
		<?php echo $form->error($model,'timeentrycreated'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'hourspayed'); ?>
		<?php echo $form->textField($model,'hourspayed'); ?>
		<?php echo $form->error($model,'hourspayed'); ?>
	</div>

	<div class="row_buttons">
		<?php echo CHtml::submitButton($model->getSubmitButtonText(),array('disabled'=>($model->lockby!=NULL && $model->lockby!=Yii::app()->user->name)?'disabled':NULL,)); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->